<div class="error">
    <?php echo validation_errors(); ?>
</div>

<?php echo form_open('/admin.php?c=anwser&m='.(isset($entry)?'update':'add')); ?>
<?php echo isset($entry)?form_hidden('id',$entry->id):''; ?>

<div class="form_row">
    <label for="author">您的称呼</label>
    <input type="text" name="author" id="author" value="<?php echo isset($entry)?$entry->author:set_value('author'); ?>"/> *
</div>
<div>解答内容</div>
<div class="form_row">
    <textarea name="a_content" id="a_content" rows="10" cols="50">
        <?php echo isset($entry)?$entry->content:set_value('a_content'); ?>
    </textarea>
</div>
<div class="form_btn">
    <input type="submit" name="submit" value="提交"/>
</div>
<?php echo form_close(); ?>

<?php $this->load->view('richeditor'); ?>